package com.santu.edu.supporter.biz.team.pojo.vo;

import com.santu.edu.supporter.biz.team.pojo.dto.UserTeamDTO;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author luoyaoqi
 * @createTime 2024/3/7
 * @description
 */
@Data
@Accessors(chain = true)
public class UserTeamVO {
    /**
     * 团队id
     */
    private String teamId;

    /**
     * 负责人id
     */
    private String userId;

    /**
     * 团队名称
     */
    private String teamName;

    /**
     * 团队类型[0:快递]
     */
    private Integer teamType;


    public static UserTeamVO convert(UserTeamDTO dto) {
        return new UserTeamVO()
                .setTeamId(dto.getTeamId())
                .setUserId(dto.getUserId())
                .setTeamName(dto.getTeamName())
                .setTeamType(dto.getTeamType().getCode());
    }
}
